package Car;

public class CarFactory {
    public static ACar getCarByName(String _name) {
        ACar returnCar = null;
        if (_name.equals("BaoMa")) {
            returnCar = new BaoMa();
        } else if (_name.equals("BenChi")) {
            returnCar = new BenChi();
        } else if (_name.equals("BYD")) {
            returnCar = new BYD();
        }
        return returnCar;
    }

}
